package fruit;

/*
    折扣
 */
public class Discount extends BaseFruit {
    public double totalPrice ;

    public Discount(double totalPrice) {
        this.totalPrice = totalPrice;
    }

    @Override
    public Double price() {
        return this.totalPrice * 0.8;
    }
}
